{% extends 'layout.html' %}
{% load static %}
{% block css %}
<link rel="stylesheet" href="plugins/bootstrap-datepicker/css/bootstrap-datepicker.min.css">
{% endblock %}
{% block content %}
<div class="panel panel-default">
    <div class="panel-heading">
        <h3 class="panel-title">新建用户</h3>
    </div>
    <div class="panel-body">
        <form method="post">
            {% csrf_token %}
            <div class="form-group">
                <label>姓名</label>
                <input type="text" class="form-control" placeholder="姓名" name="name">
            </div>
            <div class="form-group">
                <label>密码</label>
                <input type="text" class="form-control" placeholder="密码" name="password">
            </div>
            <div class="form-group">
                <label>年龄</label>
                <input type="text" class="form-control" placeholder="年龄" name="age">
            </div>
            <div class="form-group">
                <label>工资</label>
                <input type="text" class="form-control" placeholder="工资" name="salary">
            </div>
            <div class="form-group">
                <label>入职时间</label>
                <input id="dt" type="text" class="form-control" placeholder="入职时间" name="create_time">
            </div>
            <div class="form-group">
                <label>部门</label>
                <select name="dp" id="" class="form-control">
                    {% for depart in depart_list %}
                    <option value="{{ depart.id }}">{{ depart.title }}</option>
                    {% endfor %}
                </select>
            </div>
            <div class="性别" style="padding-bottom: 15px">
                <label>性别</label>
                <select name="gd" id="" class="form-control">
                    {% for obj in gender_choices %}
                    <option value="{{ obj.0 }}">{{ obj.1}}</option>
                    {% endfor %}
                </select>
            </div>
            <button type="submit" class="btn btn-default btn-primary">提 交</button>
        </form>
    </div>
</div>
{% endblock %}
{% block js %}
<script src="{% static 'plugins/bootstrap-datepicker/js/bootstrap-datepicker.min.js' %}"></script>
<script src="{% static 'plugins/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js' %}"></script>
<script>
    $(function() {
        $('#dt').datepicker({
            format: 'yyyy-mm-dd',
            startDate: '8',
            language: 'zh-CN',
            autoclose: true
        });
    })
</script>
{% endblock %}